package smartgrid.agents.broker;

import java.util.List;
import java.util.Map;
import smartgrid.modules.trade.Contract;
import smartgrid.modules.trade.Demand;
import smartgrid.modules.trade.Offer;

public interface IBrokerAgent {
	
	/**
	 * Get broker identification
	 * 
	 * @param none
	 * @return Broker identification
	 */
	public int getId();
	
	
	/**
	 * Initialize the round
	 * 
	 * @param round
	 *          Number of the simulation round
	 * @return none
	 */
	public void initTimestep(int timestep);
	
	
	/**
	 * Add an offer of energy to the auction
	 * 
	 * @param offer
	 *          Energy offer
	 * @return none
	 */
	public void addOffer(Offer offer);
	
	
	/**
	 * Get offers
	 * 
	 * @param none
	 * @return Registered offers
	 */
	public Map<Integer, Offer> getOffers();
	
	
	/**
	 * Add a demand of energy to the auction
	 * 
	 * @param demand
	 *          Prosumer demand
	 * @return none
	 */
	public void addDemand(Demand demand);
	
	
	/**
	 * Perform the auction
	 * 
	 * @param none
	 * @return Formed contracts
	 */
	public List<Contract> auction();
	
	
	/**
	 * Get a Broker's output record
	 * 
	 * @param none
	 * @return Broker output record
	 */
	public void generateOutput();
}